﻿
using Xacml.Core;
using System;
using System.Xml;

namespace Xacml.Core.Policy
{
  public abstract class TargetMatchBase : TargetMatchBaseReadWrite
  {
    public override string MatchId
    {
      set
      {
        throw new NotSupportedException();
      }
    }

    public override AttributeValueElementReadWrite AttributeValue
    {
      get
      {
        return (AttributeValueElementReadWrite) new AttributeValueElement(base.AttributeValue.DataType, base.AttributeValue.Value, base.AttributeValue.SchemaVersion);
      }
      set
      {
        throw new NotSupportedException();
      }
    }

    public override AttributeReferenceBase AttributeReference
    {
      set
      {
        throw new NotSupportedException();
      }
    }

    protected TargetMatchBase(string matchId, AttributeValueElementReadWrite attributeValue, AttributeReferenceBase attributeReference, XacmlVersion schemaVersion)
      : base(matchId, attributeValue, attributeReference, schemaVersion)
    {
    }

    protected TargetMatchBase(XmlReader reader, string matchNodeName, string attributeDesignatorNode, XacmlVersion schemaVersion)
      : base(reader, matchNodeName, attributeDesignatorNode, schemaVersion)
    {
    }
  }
}
